package com.rfsp.mcp.service;

import com.rfsp.common.base.BaseService;
import com.rfsp.mcp.mapper.AgreementRecordMapper;
import com.rfsp.mcp.pojo.po.AgreementRecordPO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

import java.util.List;

@Service
public class RecordService extends BaseService<AgreementRecordPO>{
	
	public Logger logger = LoggerFactory.getLogger(RecordService.class);
	
	@Autowired
	AgreementRecordMapper recordMapper;


	public static String AGREEMENT_SUQIAN = "mcp_suqian";
	public static String AGREEMENT_COMMON = "mcp_common";

	public AgreementRecordPO getRecord(Long orgId, String agreementNo){
		List<AgreementRecordPO> list = recordMapper.getRecord(orgId, agreementNo);
		if(!ObjectUtils.isEmpty(list)){
			return list.get(0);
		}else {
			return null;
		}
	}


}
